#ifndef _GUI_
#define _GUI_

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "st7789.h"
#include "fontx.h"
#include "decode_image.h"
#include "pngle.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_err.h"
#include "esp_log.h"
#include "esp_system.h"
#include "esp_vfs.h"
#include "esp_spiffs.h"
#include "gbk.h"
#define WAIT(x)	vTaskDelay(x)
#if 1
#define CONFIG_WIDTH  240
#define CONFIG_HEIGHT 240
#define CONFIG_MOSI_GPIO 19
#define CONFIG_SCLK_GPIO 18
#define CONFIG_CS_GPIO 5
#define CONFIG_DC_GPIO 13
#define CONFIG_RESET_GPIO 15
#define CONFIG_BL_GPIO 4
#define CONFIG_OFFSETX 40
#define CONFIG_OFFSETY 52
#endif
TickType_t RoundRectTest(TFT_t * dev, int width, int height,uint16_t color);
TickType_t JPEGshow(TFT_t * dev, char * file, int width, int height,int _cols,int _rows); 
TickType_t JPEGTest(TFT_t * dev, char * file, int width, int height);
TickType_t PNGTest(TFT_t * dev, char * file, int width, int height,int x1,int y1);
void png_init();
void png_draw(pngle_t *pngle, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint8_t rgba[4]);
void png_finish(pngle_t *pngle);
void jindu(int m, uint16_t color);
void show_rate(void (*fun)(),uint8_t rate,uint16_t color);
void LCD_ShowChinese(TFT_t * dev,uint16_t x, uint16_t y, uint8_t index, uint16_t color,const unsigned char * bin);
void LCD_ShowNum(TFT_t * dev,uint16_t x, uint16_t y, uint8_t index, uint16_t color);
void LCD_Show_MoreNum(TFT_t * dev,uint16_t x, uint16_t y, uint16_t index, uint16_t color,uint8_t flag)	;
void lcdShowClock(TFT_t * dev,uint16_t x, uint16_t y, uint16_t index, uint16_t color);
TickType_t PNG_SHOW( char * file, int width, int height,int x1,int y1,uint8_t *data,uint8_t w);
#endif